package com.eagle.roomcrawler.util.threadLocal;

/**
 * @author llx
 * @Decription:请求持有者
 * @date:created in 11:38 2018/4/2
 * @modify by
 */
public class RequestHolder {

    private final static ThreadLocal<Long> requestHolder = new ThreadLocal<>();

    public static void add(Long id) {
        requestHolder.set(id);
    }

    public static Long getId() {
        return requestHolder.get();
    }

    public static void remove() {
        requestHolder.remove();
    }
}
